package cn.com.nes.mybatis.callcenter.mapper;

import cn.com.nes.mybatis.callcenter.entity.WorkOrderInfo;
import cn.com.nes.site.entity.dto.workOrder.WorkOrderListExportDto;
import cn.com.nes.site.entity.vo.workOrder.GetAllWorkOrderPageVO;
import cn.com.nes.site.entity.vo.workOrder.GetWorkOrderInstallPageVO;
import cn.com.nes.site.entity.vo.workOrder.GetWorkOrderRepairPageVO;
import cn.com.nes.site.entity.vo.workOrder.WorkOrderListVo;
import cn.com.nes.site.service.workOrder.bo.GetWorkOrderStatisticalBO;
import cn.com.nes.site.service.workOrder.bo.QueryInstallWorkOrderBO;
import cn.com.nes.site.service.workOrder.dto.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author yishuai
 */
public interface CallWorkOrderInfoMapper extends BaseMapper<WorkOrderInfo> {

    int getWorkOrderCount(@Param("manufactureId") String manufactureId, @Param("userId") String userId,
                          @Param("gdzt") List<Integer> gdzt, @Param("auditStatus") Integer auditStatus,
                          @Param("cxtj") String cxtj);

    int getPendingDispatchCount(@Param("manufactureId") String manufactureId, @Param("userId") String userId);

    List<GetAllWorkOrderPageDTO> queryOrderPage(@Param("page") Page<GetAllWorkOrderPageDTO> page, @Param("vo") GetAllWorkOrderPageVO vo);

    List<GetWorkOrderRepairPageDTO> getWorkOrderRepairPage(@Param("page") Page<GetWorkOrderRepairPageDTO> page, @Param("vo") GetWorkOrderRepairPageVO vo);

    List<GetWorkOrderInstallPageDTO> getWorkOrderInstallPage(@Param("page") Page<GetWorkOrderInstallPageDTO> page, @Param("vo") GetWorkOrderInstallPageVO vo, @Param("queryBO") QueryInstallWorkOrderBO queryBO);

    List<WorkOrderInstallRecordDTO> getWorkOrderInstallTimeAxis(@Param("workOrderId") Long workOrderId);

    Long getHouseIdByWorkOrderId(@Param("workOrderId") Long workOrderId);

    Integer rejectionOrderInstall(@Param("workOrderInfo") WorkOrderInfo workOrderInfo);

    Integer getWorkOrderCountByCustomerId(@Param("customerId") String customerId);

    List<CustomerRefusalWorkOrderInfoDTO> getCustomerRefusalWorkOrderInfo(@Param("customerIdList") List<String> customerIdList, @Param("workOrderIdSet") Set<Long> workOrderIdSet);

    List<String> getCustomerIdListByDispatched(@Param("isDispatched") Integer isDispatched,@Param("audited") Integer audited);

    Integer statisticalWorkOrderCount(@Param("bo") GetWorkOrderStatisticalBO bo);

    Integer getRejectionWorkOrderCount(@Param("bo") GetWorkOrderStatisticalBO bo);

    List<WorkOrderListExportDto> exportWorkOrderList(@Param("vo") WorkOrderListVo vo);

    WorkOrderInfo getWorkOrderByPworkOrderId(@Param("pWorkOrderId") Long pWorkOrderId );

}




